/**============================================================================
 Confidential Information - Limited distribution to authorized persons only.
 This software is protected as an unpublished work under the U.S. Copyright
 Act of 1976.

 Copyright (c) 2012, BluePhoenix Solutions, Inc. All rights reserved.
 ----------------------------------------------------------------------------
 file......: DownloadResult.java
 Author....: Vyacheslav Kovalyov
 Created...: 1/18/12

 Description:

 ============================================================================*/
package com.bphx.android;

/**
 * @author Vyacheslav Kovalyov
 * @version 1.0
 */
public class BaseAsynchResult implements IAsynchResult {

    public BaseAsynchResult() {
        success = true;
    }

    public BaseAsynchResult(String exceptionMessage) {
        setFailCause(exceptionMessage);
    }

    @Override
    public void setStatus(boolean success) {
        this.success = success;
    }

    @Override
    public boolean isSuccess() {
        return success;
    }

    @Override
    public String getFailCause() {
        return exceptionMessage;
    }

    @Override
    public void setFailCause(String exceptionMessage) {
        this.exceptionMessage = exceptionMessage;
        setStatus(false);
    }

    private boolean success;
    private String exceptionMessage;
}
